package io;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class ReadStringDemo {
    public static void main(String[] args) throws IOException {
        File file = new File("./abc.txt");
        FileInputStream fis =  new FileInputStream(file);
        byte[] b = new byte[(int)file.length()];
        fis.read(b);
        String s = new String(b, StandardCharsets.UTF_8);
        System.out.println(s);
        fis.close();
    }
}